
package com.zy.ems.model;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import com.zy.ems.common.base.BaseEntity;

public class MemberAnswerEntity extends BaseEntity {
    private static final long serialVersionUID = 1L;


    /**
     * ID(db_column: id)
     */
    private Integer id;

    /**
     * 题目ID(db_column: question_id)
     */
    private Integer questionId;

    /**
     * 试卷ID(db_column: paper_id)
     */
    private Integer paperId;

    /**
     * 答题人ID(db_column: member_id)
     */
    private Integer memberId;

    /**
     * 填空题答案(db_column: blank_answer)
     */
    private String blankAnswer;

    /**
     * 选择题答案(db_column: choice_answer)
     */
    private String choiceAnswer;

    /**
     * 简单题答案(db_column: short_answer)
     */
    private String shortAnswer;

    /**
     * 答题时间(db_column: create_time)
     */
    private Integer createTime;


    public MemberAnswerEntity(){
    }

    public MemberAnswerEntity(
            Integer id
            ){
        this.id = id;
    }


    public Integer getId() {
        return this.id;
    }

    public void setId(Integer value) {
        this.id = value;
    }

    public Integer getQuestionId() {
        return this.questionId;
    }

    public void setQuestionId(Integer value) {
        this.questionId = value;
    }

    public Integer getPaperId() {
        return this.paperId;
    }

    public void setPaperId(Integer value) {
        this.paperId = value;
    }

    public Integer getMemberId() {
        return this.memberId;
    }

    public void setMemberId(Integer value) {
        this.memberId = value;
    }

    public String getBlankAnswer() {
        return this.blankAnswer;
    }

    public void setBlankAnswer(String value) {
        this.blankAnswer = value;
    }

    public String getChoiceAnswer() {
        return this.choiceAnswer;
    }

    public void setChoiceAnswer(String value) {
        this.choiceAnswer = value;
    }

    public String getShortAnswer() {
        return this.shortAnswer;
    }

    public void setShortAnswer(String value) {
        this.shortAnswer = value;
    }

    public Integer getCreateTime() {
        return this.createTime;
    }

    public void setCreateTime(Integer value) {
        this.createTime = value;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("Id", getId())
            .append("QuestionId", getQuestionId())
            .append("PaperId", getPaperId())
            .append("MemberId", getMemberId())
            .append("BlankAnswer", getBlankAnswer())
            .append("ChoiceAnswer", getChoiceAnswer())
            .append("ShortAnswer", getShortAnswer())
            .append("CreateTime", getCreateTime())
            .toString();
    }

    @Override
    public int hashCode() {
        return new HashCodeBuilder()
            .append(getId())
            .toHashCode();
    }

    @Override
    public boolean equals(Object obj) {
        if(!(obj instanceof MemberAnswerEntity)) {
            return false;
        }
        if(this == obj) {
            return true;
        }
        MemberAnswerEntity other = (MemberAnswerEntity) obj;
        return new EqualsBuilder()
            .append(getId(), other.getId())
            .isEquals();
    }
}

